<?php
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
//var_dump($_G);
if(!$_G['gp_method']){
	exit('No Method Defined!');
} else if ($_G['gp_method'] == 'city'){
	if(!$_G['gp_upid']) $_G['gp_upid'] = 0;
	$query = DB::query('SELECT id, name FROM '.DB::table('common_district').' WHERE upid='.$_G['gp_upid'].' ORDER BY displayorder');
	$s = array();
	while($value = DB::fetch($query)) {
		$s[] = $value;
	}
	//var_dump($s);
	echo json_encode($s);
} else if ($_G['gp_method'] == 'apply'){
echo <<<TXTS
<?xml version="1.0" encoding="utf-8"?>
<root><![CDATA[
<div id="main_messaqge_LRT6s">
<div id="layer_login_LRT6s">
<h3 class="flb">
<em id="returnmessage_LRT6s">
用户登录</em>
<span><a href="javascript:;" class="flbc" onclick="hideWindow('login', 0, 1);" title="关闭">关闭</a></span>
</h3>
<form method="post" autocomplete="off" name="login" id="loginform_LRT6s" class="cl" onsubmit="pwdclear = 1;ajaxpost('loginform_LRT6s', 'returnmessage_LRT6s', 'returnmessage_LRT6s', 'onerror');return false;" action="member.php?mod=logging&amp;action=login&amp;loginsubmit=yes&amp;handlekey=login&amp;loginhash=LRT6s">
<div class="c cl">
<input type="hidden" name="formhash" value="64d7a443" />
<input type="hidden" name="referer" value="http://localhost/discuzx/forum.php" />
<div class="rfm">
<table>
<tr>
<th>
<span class="login_slct">
<select name="loginfield" style="float: left;" width="45" id="loginfield_LRT6s">
<option value="username">用户名</option>
<option value="uid">UID</option>
<option value="email">Email</option>
</select>
</span>
</th>
<td><input type="text" name="username" id="username_LRT6s" autocomplete="off" size="30" class="px p_fre" tabindex="1" value="" /></td>
<td class="tipcol"><a href="member.php?mod=register">立即注册</a></td>
</tr>
</table>
</div>
<div class="rfm">
<table>
<tr>
<th><label for="password3_LRT6s">密码:</label></th>
<td><input type="password" id="password3_LRT6s" name="password" onfocus="clearpwd()" size="30" class="px p_fre" tabindex="1" /></td>
<td class="tipcol"><a href="javascript:;" onclick="display('layer_login_LRT6s');display('layer_lostpw_LRT6s');" title="找回密码">找回密码</a></td>
</tr>
</table>
</div>
<div class="rfm">
<table>
<tr>
<th>安全提问:</th>
<td><select id="loginquestionid_LRT6s" width="213" name="questionid" onchange="if($('loginquestionid_LRT6s').value > 0) {}">
<option value="0">安全提问(未设置请忽略)</option>
<option value="1">母亲的名字</option>
<option value="2">爷爷的名字</option>
<option value="3">父亲出生的城市</option>
<option value="4">你其中一位老师的名字</option>
<option value="5">你个人计算机的型号</option>
<option value="6">你最喜欢的餐馆名称</option>
<option value="7">驾驶执照最后四位数字</option>
</select></td>
</tr>
</table>
</div>
<div class="rfm" id="loginanswer_row_LRT6s"  style="display:none">
<table>
<tr>
<th>答案:</th>
<td><input type="text" name="answer" id="loginanswer_LRT6s" autocomplete="off" size="30" class="px p_fre" tabindex="1" /></td>
</tr>
</table>
</div>


<div class="rfm  bw0">
<table>
<tr>
<th></th>
<td><label for="cookietime_LRT6s"><input type="checkbox" class="pc" name="cookietime" id="cookietime_LRT6s" tabindex="1" value="2592000"  />自动登录</label></td>
</tr>
</table>
</div>

<div class="rfm mbw bw0">
<table width="100%">
<tr>
<th>&nbsp;</th>
<td>
<button class="pn pnc" type="submit" name="loginsubmit" value="true" tabindex="1"><strong>登录</strong></button>
</td>
<td>
</td>
</tr>
</table>
</div>

</div>
</form>
</div>
<div id="layer_lostpw_LRT6s" style="display: none;">
<h3 class="flb">
<em id="returnmessage3_LRT6s">找回密码</em>
<span><a href="javascript:;" class="flbc" onclick="hideWindow('login')" title="关闭">关闭</a></span>
</h3>
<form method="post" autocomplete="off" id="lostpwform_LRT6s" class="cl" onsubmit="ajaxpost('lostpwform_LRT6s', 'returnmessage3_LRT6s', 'returnmessage3_LRT6s', 'onerror');return false;" action="member.php?mod=lostpasswd&amp;lostpwsubmit=yes&amp;infloat=yes">
<div class="c cl">
<input type="hidden" name="formhash" value="64d7a443" />
<input type="hidden" name="handlekey" value="lostpwform" />
<div class="rfm">
<table>
<tr>
<th><label for="lostpw_username">用户名:</label></th>
<td><input type="text" name="username" id="lostpw_username" size="30" value=""  tabindex="1" class="px p_fre" /></td>
</tr>
</table>
</div>
<div class="rfm">
<table>
<tr>
<th><label for="lostpw_email">Email:</label></th>
<td><input type="text" name="email" id="lostpw_email" size="30" value=""  tabindex="1" class="px p_fre" /></td>
</tr>
</table>
</div>

<div class="rfm mbw bw0">
<table>
<tr>
<th></th>
<td><button class="pn pnc" type="submit" name="lostpwsubmit" value="true" tabindex="100"><span>提交</span></button></td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>

<div id="layer_message_LRT6s" style="display: none;">
<h3 class="flb" id="layer_header_LRT6s">
<em>用户登录</em>
<span><a href="javascript:;" class="flbc" onclick="hideWindow('login')" title="关闭">关闭</a></span>
</h3>
<div class="c"><div class="alert_right">
<div id="messageleft_LRT6s"></div>
<p class="alert_btnleft" id="messageright_LRT6s"></p>
</div>
</div>

<script src="static/js/md5.js?jaJ" type="text/javascript" reload="1"></script>
<script type="text/javascript" reload="1">
var pwdclear = 0;
function initinput_login() {
document.body.focus();
if($('loginform_LRT6s')) {
$('loginform_LRT6s').username.focus();
}
simulateSelect('loginfield_LRT6s');
}
initinput_login();

function clearpwd() {
if(pwdclear) {
$('password3_LRT6s').value = '';
}
pwdclear = 0;
}
</script>]]></root>
TXTS;
header("Content-Type: text/xml;charset=utf-8");
echo $s;
}
?>